/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package cult.ticketing.bean;

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Calendar;

/**
 *
 * @author yo
 */
public class test {
    public static void main(String [] args){
        Calendar purchaseTime = Calendar.getInstance(); // Get current time
        String myString = DateFormat.getDateTimeInstance().format(purchaseTime.getTime());
//2011-4-10 17:12:37
        System.out.println(myString);

        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy.MM.dd HH:mm:ss");


        String bookedSeat = "1,1;3,3;";
        String seatIndex = "1,1;";
        boolean b = true;

        String[] booked = bookedSeat.split(";");
        String[] toBeBooked = seatIndex.split(";");
        for (int i=0; i<booked.length; i++) {
            for (int j=0; j<toBeBooked.length; j++)
                if (toBeBooked[j].equals(booked[i]))
                b = false;
        }
    }
}
